package com.cm.projectx.constants;

import com.cm.projectx.entity.PriceTask;

import java.util.HashMap;
import java.util.Map;

public class PriceReportConstants {
    private static Map<String, Map<String, Object>> PRICE_REPORT_EXPORT_FILE_FIELD_CONFIG = new HashMap() {{
        put("T001", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "0、居民生活消费（食）品零售价格监测报表（县、市、区）");
            put("startRow", 4);
            put("fields", new HashMap<String, Integer>() {{
                put("no", 0);
                put("name", 1);
                put("kind", 2);
                put("unit", 3);
                put("avgMarketPrice", 4);
                put("avgSuperPrice", 5);
            }});
        }});
        put("T002", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "1、居民生活消费（食）品零售价格监测周报表（超市）");
            put("startRow", 4);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("indexType", 4);
                put("priceAlarmPercent", 5);
                put("scheduleType", 6);
            }});
        }});
        put("T003", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "2、居民生活消费（食）品零售价格监测周报表（集市）");
            put("startRow", 4);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("indexType", 4);
                put("priceAlarmPercent", 5);
                put("scheduleType", 6);
            }});
        }});
        put("T004", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "3、农产品批发市场粮油价格");
            put("startRow", 4);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("priceAlarmPercent", 4);
                put("indexType", 5);
                put("scheduleType", 6);
            }});
        }});
        put("T005", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "4、城市居民日用工业消费品零售价格");
            put("startRow", 4);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("indexType", 4);
                put("scheduleType", 5);
                put("priceAlarmPercent", 6);
            }});
        }});
        put("T006", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "5、农业生产资料价格管理");
            put("startRow", 4);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("indexType", 3);
                put("priceAlarmPercent", 4);
                put("scheduleType", 5);
            }});
        }});
        put("T007", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "6、食用油");
            put("startRow", 4);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("purchasePrice", 3);
                put("factoryPrice", 4);
                put("scheduleType", 5);
                put("monitorName", 6);
                put("priceAlarmPercent", 7);
            }});
        }});
        put("T008", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "7、小麦、面粉价格监测报表");
            put("startRow", 3);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("avgStock", 4);
                put("avgSale", 5);
                put("indexType", 6);
                put("scheduleType", 7);
            }});
        }});
        put("T009", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "8、玉米及相关商品价格监测报表");
            put("startRow", 2);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("avgStock", 4);
                put("avgSale", 5);
                put("indexType", 6);
                put("monitorName", 7);
                put("scheduleType", 8);
            }});
        }});
        put("T010", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "9、食用油价格监测报表");
            put("startRow", 3);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("avgStock", 4);
                put("avgSale", 5);
                put("indexType", 6);
                put("scheduleType", 7);
            }});
        }});
        put("T011", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "10、生猪及相关商品价格监测报表");
            put("startRow", 3);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("avgStock", 4);
                put("avgSale", 5);
                put("indexType", 6);
                put("scheduleType", 7);
            }});
        }});
        put("T012", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "11、鸡蛋价格监测报表");
            put("startRow", 3);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("avgStock", 4);
                put("avgSale", 5);
                put("indexType", 6);
                put("scheduleType", 7);
            }});
        }});
        put("T013", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "12、牛奶及相关商品价格监测报表");
            put("startRow", 3);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("avgStock", 4);
                put("avgSale", 5);
                put("indexType", 6);
                put("scheduleType", 7);
            }});
        }});
        put("T014", new HashMap<String, Object>() {{
            put("file", "priceMonitorV3.xlsx");
            put("sheet", "13、食盐价格监测报表");
            put("startRow", 3);
            put("fields", new HashMap<String, Integer>() {{
                put("name", 0);
                put("kind", 1);
                put("unit", 2);
                put("avgMarketPrice", 3);
                put("avgStock", 4);
                put("avgSale", 5);
                put("indexType", 6);
                put("monitorName", 7);
                put("scheduleType", 8);
            }});
        }});
    }};

    public static Map<String, Object> getConfigByPriceTask(PriceTask priceTask) {
        return PRICE_REPORT_EXPORT_FILE_FIELD_CONFIG.get(priceTask.getDkTemplateTypesCode());
    }
}
